package logic

import (
	"context"
	"travel/rpc/proto/travel"
	"travel/service/server"
)

type TravelServer struct {
	travel.TravelServer
}

func (t TravelServer) Register(ctx context.Context, in *travel.RegisterReq) (*travel.RegisterResp, error) {
	register, err := server.Register(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}

func (t TravelServer) Login(ctx context.Context, in *travel.LoginReq) (*travel.LoginResp, error) {
	login, err := server.Login(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}

func (t TravelServer) GoodsCreate(ctx context.Context, in *travel.GoodsCreateReq) (*travel.GoodsCreateResp, error) {
	create, err := server.GoodsCreate(in)
	if err != nil {
		return nil, err
	}
	return create, nil
}

func (t TravelServer) RealName(ctx context.Context, in *travel.RealNameReq) (*travel.RealNameResp, error) {
	name, err := server.RealName(in)
	if err != nil {
		return nil, err
	}
	return name, nil
}

func (t TravelServer) OrderSn(ctx context.Context, in *travel.OrderSnReq) (*travel.OrderSnResp, error) {
	sn, err := server.OrderSn(in)
	if err != nil {
		return nil, err
	}
	return sn, nil
}

func (t TravelServer) Insure(ctx context.Context, in *travel.InsureReq) (*travel.InsureResp, error) {
	insure, err := server.Insure(in)
	if err != nil {
		return nil, err
	}
	return insure, nil
}

func (t TravelServer) Callback(ctx context.Context, in *travel.CallbackReq) (*travel.CallbackResp, error) {
	callback, err := server.Callback(in)
	if err != nil {
		return nil, err
	}
	return callback, nil
}

func (t TravelServer) ScenicSo(ctx context.Context, in *travel.ScenicSoReq) (*travel.ScenicSoResp, error) {
	so, err := server.ScenicSo(in)
	if err != nil {
		return nil, err
	}
	return so, nil
}

func (t TravelServer) OrderFind(ctx context.Context, in *travel.OrderFindReq) (*travel.OrderFindResp, error) {
	find, err := server.OrderFind(in)
	if err != nil {
		return nil, err
	}
	return find, nil
}

func (t TravelServer) Refund(ctx context.Context, in *travel.RefundReq) (*travel.RefundResp, error) {
	refund, err := server.Refund(in)
	if err != nil {
		return nil, err
	}
	return refund, nil
}
